package com.zb.spring5.ioc.constructor;

import com.zb.spring5.ioc.entity.Dependency;

public class ConstructorInjection {

    private Dependency dependency;

    /**
     * 构造器注入满足不可变的注入情况
     * @param dependency
     */
    public ConstructorInjection(Dependency dependency) {
        this.dependency = dependency;
    }

    @Override
    public String toString() {
        return dependency.toString();
    }
}
